package com.axxc.cloud.config;
import java.io.File;

import org.mybatis.generator.api.MyBatisGenerator;
import org.mybatis.generator.config.Configuration;
import org.mybatis.generator.config.xml.ConfigurationParser;
import org.mybatis.generator.internal.DefaultShellCallback;


public class CodeGenericProvicer {

	public static void main(String[] args) throws Exception {
		try {
			// 指定 逆向工程配置文件
			ConfigurationParser cp = new ConfigurationParser(null);
			Configuration config = cp.parseConfiguration(new File("generatorConfig.xml"));
			MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, new DefaultShellCallback(true), null);
			myBatisGenerator.generate(null);
		} catch (Exception e) {
			e.printStackTrace();
		}

	}

}
